This new test fails on several architectures. But it is a new test
intended to check for a Linux kernel regression, so we are not worse
off than were before. Add it to the EXTRACASES variables, which has
currently the side effect of disabling it, as it is not handled
explicitly in the make target responsible for that variable.
Sent-Upstream: not-relevant Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0016-harness-Disable-failing-test-23.patch
The kernel compat syscall in the kernel got introduced with a broken
layout, which requires a pointer to the actual sigset_t variable but
with the size of the running kernel, not the size of the compat code.
This means that when the wrapper sends the expected compat (32-bit)
pointer, the kernel reads a 64-bit pointer, eating with it also the
sigset size member. And then proceeds to fail the comparison of the
sigset_t size and returns EINVAL.
This really needs to be fixed in the kernel, as there's no apparent
user of the broken compat layout (from codesearch.debian.org, nor a
quick github.com search). But we have to workaround it in libaio so
that we can use kernels that have not yet been fixed.
We do that, by trying the non-broken layout (that would be used with
a 32-bit userland on a 32-bit kernel), and if that fails with -EINVAL
we retry with a structure padded to what the kernel expects.
Sent-Upstream: rejected Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0015-Fix-io_pgetevents-syscall-wrapper-on-32-bit-userland.patch
The LTO support cannot work properly when there are versioned symbols
via asm statements, as those are not seen by the compiler. Use the new
function attributes if supported instead of the asm statements.
We need to move the SYMVER calls after the function definitions
otherwise it will reference symbols not yet seen.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0006-Use-new-symver-function-attribute-to-support-LTO-bui.patch
[PATCH libaio 03/16] build: Honor user build flags
CPPFLAGS, CFLAGS and LDFLAGS are user flags, which we need to preserve,
regardless of the user passing them over the environment or the
command-line. Any required flag that the build system needs, has to be
set in some other flag (which we will namespace with «MK_») so that the
build will use even if the user flags are passed, even though the user
should be able to override by appending after them. We pass CPPFLAGS to
any compilation command that missed them.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0003-build-Honor-user-build-flags.patch
[PATCH libaio 02/16] build: Fix DESTDIR and pathname variables handling
The convention for DESTDIR is that it is only prefixed during the
install target. In this case we postpone that to the inner Makefile
so that it can be invoked directly while preserving the expected
semantics. We should also prefer the user specified pathname variables
if already set in any way, and do not need to pass them explicitly
to the sub-make.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0002-build-Fix-DESTDIR-and-pathname-variables-handling.patch
Guillem Jover [Sun, 6 Aug 2023 19:12:34 +0000 (20:12 +0100)]
libaio (0.3.113-5) unstable; urgency=medium
* Wrap fields in debian/tests/control.
* Fix upstream build system to remove all test artifacts on clean.
Reported by Lucas Nussbaum <lucas@debian.org>.
This new test fails on several architectures. But it is a new test
intended to check for a Linux kernel regression, so we are not worse
off than were before. Add it to the EXTRACASES variables, which has
currently the side effect of disabling it, as it is not handled
explicitly in the make target responsible for that variable.
Sent-Upstream: not-relevant Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0001-harness-Disable-failing-test-23.patch
The kernel compat syscall in the kernel got introduced with a broken
layout, which requires a pointer to the actual sigset_t variable but
with the size of the running kernel, not the size of the compat code.
This means that when the wrapper sends the expected compat (32-bit)
pointer, the kernel reads a 64-bit pointer, eating with it also the
sigset size member. And then proceeds to fail the comparison of the
sigset_t size and returns EINVAL.
This really needs to be fixed in the kernel, as there's no apparent
user of the broken compat layout (from codesearch.debian.org, nor a
quick github.com search). But we have to workaround it in libaio so
that we can use kernels that have not yet been fixed.
We do that, by trying the non-broken layout (that would be used with
a 32-bit userland on a 32-bit kernel), and if that fails with -EINVAL
we retry with a structure padded to what the kernel expects.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0014-Fix-io_pgetevents-syscall-wrapper-on-32-bit-userland.patch
The LTO support cannot work properly when there are versioned symbols
via asm statements, as those are not seen by the compiler. Use the new
function attributes if supported instead of the asm statements.
We need to move the SYMVER calls after the function definitions
otherwise it will reference symbols not yet seen.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0005-Use-new-symver-function-attribute-to-support-LTO-bui.patch
[PATCH libaio 03/14] build: Honor user build flags
CPPFLAGS, CFLAGS and LDFLAGS are user flags, which we need to preserve,
regardless of the user passing them over the environment or the
command-line. Any required flag that the build system needs, has to be
set in some other flag (which we will namespace with «MK_») so that the
build will use even if the user flags are passed, even though the user
should be able to override by appending after them. We pass CPPFLAGS to
any compilation command that missed them.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0003-build-Honor-user-build-flags.patch
[PATCH libaio 02/14] build: Fix DESTDIR and pathname variables handling
The convention for DESTDIR is that it is only prefixed during the
install target. In this case we postpone that to the inner Makefile
so that it can be invoked directly while preserving the expected
semantics. We should also prefer the user specified pathname variables
if already set in any way, and do not need to pass them explicitly
to the sub-make.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0002-build-Fix-DESTDIR-and-pathname-variables-handling.patch
This new test fails on several architectures. But it is a new test
intended to check for a Linux kernel regression, so we are not worse
off than were before. Add it to the EXTRACASES variables, which has
currently the side effect of disabling it, as it is not handled
explicitly in the make target responsible for that variable.
Sent-Upstream: not-relevant Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0001-harness-Disable-failing-test-23.patch
Guillem Jover [Fri, 16 Aug 2019 00:33:46 +0000 (02:33 +0200)]
[PATCH libaio 14/14] Fix io_pgetevents() syscall wrapper on 32-bit userland on 64-bit kernels
The kernel compat syscall in the kernel got introduced with a broken
layout, which requires a pointer to the actual sigset_t variable but
with the size of the running kernel, not the size of the compat code.
This means that when the wrapper sends the expected compat (32-bit)
pointer, the kernel reads a 64-bit pointer, eating with it also the
sigset size member. And then proceeds to fail the comparison of the
sigset_t size and returns EINVAL.
This really needs to be fixed in the kernel, as there's no apparent
user of the broken compat layout (from codesearch.debian.org, nor a
quick github.com search). But we have to workaround it in libaio so
that we can use kernels that have not yet been fixed.
We do that, by trying the non-broken layout (that would be used with
a 32-bit userland on a 32-bit kernel), and if that fails with -EINVAL
we retry with a structure padded to what the kernel expects.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0014-Fix-io_pgetevents-syscall-wrapper-on-32-bit-userland.patch
Guillem Jover [Tue, 2 Nov 2021 21:37:32 +0000 (22:37 +0100)]
[PATCH libaio 05/14] Use new symver function attribute to support LTO builds
The LTO support cannot work properly when there are versioned symbols
via asm statements, as those are not seen by the compiler. Use the new
function attributes if supported instead of the asm statements.
We need to move the SYMVER calls after the function definitions
otherwise it will reference symbols not yet seen.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0005-Use-new-symver-function-attribute-to-support-LTO-bui.patch
[PATCH libaio 03/14] build: Honor user build flags
CPPFLAGS, CFLAGS and LDFLAGS are user flags, which we need to preserve,
regardless of the user passing them over the environment or the
command-line. Any required flag that the build system needs, has to be
set in some other flag (which we will namespace with «MK_») so that the
build will use even if the user flags are passed, even though the user
should be able to override by appending after them. We pass CPPFLAGS to
any compilation command that missed them.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0003-build-Honor-user-build-flags.patch
[PATCH libaio 02/14] build: Fix DESTDIR and pathname variables handling
The convention for DESTDIR is that it is only prefixed during the
install target. In this case we postpone that to the inner Makefile
so that it can be invoked directly while preserving the expected
semantics. We should also prefer the user specified pathname variables
if already set in any way, and do not need to pass them explicitly
to the sub-make.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0002-build-Fix-DESTDIR-and-pathname-variables-handling.patch
Guillem Jover [Sun, 4 Dec 2022 17:06:09 +0000 (17:06 +0000)]
libaio (0.3.113-3) unstable; urgency=medium
* Add upstream/metadata fields for bug submitting and database.
* Update lintian overrides.
* Switch to Standards-Version 4.6.1 (no changes needed).
* Move debian/copyright Source field immediately after Format field.
* Export DEB_BUILD_MAINT_OPTIONS and DEB_CFLAGS_MAINT_PREPEND.
* Switch from hardening=+bindnow to hardening=+all.
* Enable future=+lfs build feature as it does not affect the shared library
ABI, but affects the test harness.
This new test fails on several architectures. But it is a new test
intended to check for a Linux kernel regression, so we are not worse
off than were before. Add it to the EXTRACASES variables, which has
currently the side effect of disabling it, as it is not handled
explicitly in the make target responsible for that variable.
Sent-Upstream: not-relevant Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0001-harness-Disable-failing-test-23.patch
Guillem Jover [Fri, 16 Aug 2019 00:33:46 +0000 (02:33 +0200)]
[PATCH libaio 14/14] Fix io_pgetevents() syscall wrapper on 32-bit userland on 64-bit kernels
The kernel compat syscall in the kernel got introduced with a broken
layout, which requires a pointer to the actual sigset_t variable but
with the size of the running kernel, not the size of the compat code.
This means that when the wrapper sends the expected compat (32-bit)
pointer, the kernel reads a 64-bit pointer, eating with it also the
sigset size member. And then proceeds to fail the comparison of the
sigset_t size and returns EINVAL.
This really needs to be fixed in the kernel, as there's no apparent
user of the broken compat layout (from codesearch.debian.org, nor a
quick github.com search). But we have to workaround it in libaio so
that we can use kernels that have not yet been fixed.
We do that, by trying the non-broken layout (that would be used with
a 32-bit userland on a 32-bit kernel), and if that fails with -EINVAL
we retry with a structure padded to what the kernel expects.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0014-Fix-io_pgetevents-syscall-wrapper-on-32-bit-userland.patch
Guillem Jover [Tue, 2 Nov 2021 21:37:32 +0000 (22:37 +0100)]
[PATCH libaio 05/14] Use new symver function attribute to support LTO builds
The LTO support cannot work properly when there are versioned symbols
via asm statements, as those are not seen by the compiler. Use the new
function attributes if supported instead of the asm statements.
We need to move the SYMVER calls after the function definitions
otherwise it will reference symbols not yet seen.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0005-Use-new-symver-function-attribute-to-support-LTO-bui.patch
[PATCH libaio 03/14] build: Honor user build flags
CPPFLAGS, CFLAGS and LDFLAGS are user flags, which we need to preserve,
regardless of the user passing them over the environment or the
command-line. Any required flag that the build system needs, has to be
set in some other flag (which we will namespace with «MK_») so that the
build will use even if the user flags are passed, even though the user
should be able to override by appending after them. We pass CPPFLAGS to
any compilation command that missed them.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0003-build-Honor-user-build-flags.patch
[PATCH libaio 02/14] build: Fix DESTDIR and pathname variables handling
The convention for DESTDIR is that it is only prefixed during the
install target. In this case we postpone that to the inner Makefile
so that it can be invoked directly while preserving the expected
semantics. We should also prefer the user specified pathname variables
if already set in any way, and do not need to pass them explicitly
to the sub-make.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0002-build-Fix-DESTDIR-and-pathname-variables-handling.patch
* Skip new test case 23, which was added upstream for a kernel regression,
so we are not worse off than before. Its failure was known and being
looked at upstream.
Guillem Jover [Fri, 16 Aug 2019 00:33:46 +0000 (02:33 +0200)]
[PATCH libaio] Fix io_pgetevents() syscall wrapper on 32-bit userland on 64-bit kernels
The kernel compat syscall in the kernel got introduced with a broken
layout, which requires a pointer to the actual sigset_t variable but
with the size of the running kernel, not the size of the compat code.
This means that when the wrapper sends the expected compat (32-bit)
pointer, the kernel reads a 64-bit pointer, eating with it also the
sigset size member. And then proceeds to fail the comparison of the
sigset_t size and returns EINVAL.
This really needs to be fixed in the kernel, as there's no apparent
user of the broken compat layout (from codesearch.debian.org, nor a
quick github.com search). But we have to workaround it in libaio so
that we can use kernels that have not yet been fixed.
We do that, by trying the non-broken layout (that would be used with
a 32-bit userland on a 32-bit kernel), and if that fails with -EINVAL
we retry with a structure padded to what the kernel expects.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0001-Fix-io_pgetevents-syscall-wrapper-on-32-bit-userland.patch
Guillem Jover [Tue, 2 Nov 2021 21:37:32 +0000 (22:37 +0100)]
[PATCH 2/2] Use new symver function attribute to support LTO builds
The LTO support cannot work properly when there are versioned symbols
via asm statements, as those are not seen by the compiler. Use the new
function attributes if supported instead of the asm statements.
We need to move the SYMVER calls after the function definitions
otherwise it will reference symbols not yet seen.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0002-Use-new-symver-function-attribute-to-support-LTO-bui.patch
[PATCH libaio 11/11] build: Honour user build flags
CPPFLAGS, CFLAGS and LDFLAGS are user flags, which we need to preserve.
Any required flag that the build system needs, has to be set in some
other flag so that the build will succeed even if the user flags are
passed.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0011-build-Honour-user-build-flags.patch
The convention for DESTDIR is that it is only prefixed during the
install target. In this case we postpone that to the inner Makefile
so that it can be invoked directly while preserving the expected
semantics.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0009-build-Fix-DESTDIR-handling.patch
Lee Duncan [Sun, 14 Feb 2021 22:59:07 +0000 (14:59 -0800)]
[PATCH libaio] Fix test issue with gcc-11
Test 3.t exercises io_submit() with invalid addresses,
and one test attempted to pass in "-1" as an invalid
pointer. But gcc-11 realizes you cannot take an offset
from an invalid pointer, making it impossible to
compile or run this test:
> sh# make CC=gcc-11 partcheck
> make[1]: Entering directory '/alt/public_software/libaio/src'
> make[1]: Nothing to be done for 'all'.
> make[1]: Leaving directory '/alt/public_software/libaio/src'
> make[1]: Entering directory '/alt/public_software/libaio/harness'
> gcc-11 -Wall -Werror -I../src -g -O2 -DTEST_NAME=\"cases/2.t\" -o cases/2.p main.c ../src/libaio.a -lpthread
> gcc-11 -Wall -Werror -I../src -g -O2 -DTEST_NAME=\"cases/3.t\" -o cases/3.p main.c ../src/libaio.a -lpthread
> In file included from main.c:24:
> cases/3.t: In function ‘test_main’:
> cases/3.t:18:19: error: ‘attempt_io_submit’ accessing 8 bytes in a region of size 0 [-Werror=stringop-overflow=]
> 18 | status |= attempt_io_submit( io_ctx, 1, (void *)-1, -EFAULT);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cases/3.t:18:19: note: referencing argument 3 of type ‘struct iocb **’
> In file included from cases/3.t:5,
> from main.c:24:
> cases/aio_setup.h:15:5: note: in a call to function ‘attempt_io_submit’
> 15 | int attempt_io_submit(io_context_t ctx, long nr, struct iocb *ios[], int expect)
> | ^~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[1]: *** [Makefile:19: cases/3.p] Error 1
> make[1]: Leaving directory '/alt/public_software/libaio/harness'
> make: *** [Makefile:23: partcheck] Error 2
The fix is to tell gcc to relax it's stringop overflow
testing for this one test.
Changes since v1:
* First version just skipped the test in question
Signed-off-by: Lee Duncan <leeman.duncan@gmail.com> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name 0001-Fix-test-issue-with-gcc-11.patch
Guillem Jover [Wed, 21 Aug 2019 03:29:52 +0000 (05:29 +0200)]
[PATCH libaio 28/28] harness: Skip the test if io_pgetevents() is not implemented
Either the kernel or the syscall wrapper will return -ENOSYS when this
syscall is not implemented. So we should cope with this in the test
suite and SKIP the test case.
This is currently the case for alpha and ia64, even though they have
already been wired up very recently in the kernel mainline.
Signed-off-by: Guillem Jover <guillem@hadrons.org> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name 0028-harness-Skip-the-test-if-io_pgetevents-is-not-implem.patch
Guillem Jover [Wed, 21 Aug 2019 03:29:50 +0000 (05:29 +0200)]
[PATCH libaio 27/28] harness: Print better error messages on error conditions in 22.t
These should help diagnose problems when dealing with error failures.
In particular this helped distinguish the problem with io_pgetevents()
not being implemented and it failing due to the sigset_t layout bug.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
[JEM: fix up 80 columns violations] Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name 0027-harness-Print-better-error-messages-on-error-conditi.patch
The actual problem in the original code was that read() was being used
to assert whether the buffer was readable, but the kernel was instead
reading from the file descriptor and then writing into the buffer, so
no EFAULT was being generated (on architectures that do so).
We needed to use a write() so that the kernel would read from the
buffer.
Signed-off-by: Guillem Jover <guillem@hadrons.org> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name 0026-harness-Fix-PROT_WRITE-mmap-check.patch